<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/public/header/permissionCommon.jspf" %>

<head>
    <link rel="stylesheet" href="${webPath}/css/report/public.css">
</head>

<!--右侧主体区域-->

    <div class="layui-upload-drag full-width" id="upload_area">
        <i class="layui-icon"></i>
        <p>点击上传，或将文件拖拽到此处</p>
    </div>
    <input id="input-upload" class="layui-upload-file" type="file" accept="text/plain" name="file" multiple>
    <div class="layui-upload full-width">
        <div class="layui-upload-list">
            <table class="layui-table">
                <thead>
                <tr><th>文件名</th>
                    <th>大小</th>
                    <th style="width: 24%;">报表</th>
                    <th style="width: 24%;">人员类型</th>
                    <th>操作</th>
                </tr></thead>
                <tbody id="uploadList"></tbody>
            </table>
        </div>
        <button type="button" class="layui-btn" id="uploadButton">开始上传</button>
    </div>


    <!--隐藏层-->

<script type="text/html" id="template-upload-row">
    <tr id="upload-row-{{d.index}}" lay-filter="upload-row-{{d.index}}" class="layui-form" style="text-align: center;">
        <td>{{d.name}}</td>'
        <td>{{d.size}}</td>
        <%--报表类型--%>
        <td><select name="reportId" lay-filter="upload-row-selector-{{d.index}}">{{d.reportOption}}</select></td>
        <%--人员类型--%>
        <td><select name="classId" lay-filter="upload-row-selector-{{d.index}}">{{d.classOption}}</select></td>

        <td>
            <button class="layui-btn layui-btn-xs layui-btn-danger layui-hide action-displayError">
                <i class="layui-icon layui-icon-tips" style="font-weight: bolder;"></i>
            </button>
            <%--<button class="layui-btn layui-btn-xs layui-hide  action-reload">重传</button>--%>
            <button class="layui-btn layui-btn-xs layui-hide action-select">重选</button>
            <button class="layui-btn layui-btn-xs layui-hide layui-btn-danger action-delete">删除</button>
            <i class="layui-icon layui-icon-loading-1 layui-hide" style="font-size: 30px; color: #0e8e9f;">
                <%--<span style="color: #0e8e9f;">上传中</span>'--%>
            </i>
            <%--layui-anim layui-anim-rotate layui-anim-loop--%>
        </td>
    </tr>
</script>

<script type="text/html" id="uploadPreviewLayer">
<div class="layui-layout" style="width: 100%; height: 100%;padding: 12px;">
        <table id="uploadPreviewTable" lay-filter="uploadPreviewTable"></table>
</div>
</script>



<script>
    const UPLOAD_RESPONSE_STATUS = {
        <c:forEach items="${uploadDetailResponseStatus}" var="item" >
           ${ item.key}:'${ item.value}',
        </c:forEach>
    }
</script>

<script src="${webPath}/js/utils.js"></script>
<script src="${webPath}/js/permission/global/error.js"></script>

<script src="${webPath}/js/report/data-import.js" type="module"></script>
